package com.jkt.rms.business.base;

import java.io.Serializable;
import java.sql.Timestamp;


public abstract class BaseVendorAuditTrans  implements Serializable {

	private static final long serialVersionUID = 1L;
	public static String PROP_VENDOR_ADDRESS = "vendorAddress";
	public static String PROP_AUDIT_DATE = "auditDate";
	public static String PROP_BLENDED_RATE = "blendedRate";
	public static String PROP_ID = "id";
	public static String PROP_LOCATION_CODE = "locationCode";
	public static String PROP_VENDOR_CODE = "vendorCode";


	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private int id;

	// fields
	private String vendorCode;
	private String vendorAddress;
	private String locationCode;
	private float blendedRate;
	private Timestamp auditDate;


	// constructors
	public BaseVendorAuditTrans () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseVendorAuditTrans (int id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseVendorAuditTrans (
		int id,
		String vendorCode,
		String vendorAddress,
		String locationCode,
		float blendedRate,
		Timestamp auditDate) {

		this.setId(id);
		this.setVendorCode(vendorCode);
		this.setVendorAddress(vendorAddress);
		this.setLocationCode(locationCode);
		this.setBlendedRate(blendedRate);
		this.setAuditDate(auditDate);
		initialize();
	}

	protected void initialize () {}


	public int getId () {
		return id;
	}


	public void setId (int id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}


	public String getVendorCode () {
		return vendorCode;
	}


	public void setVendorCode (String vendorCode) {
		this.vendorCode = vendorCode;
	}


	public String getVendorAddress () {
		return vendorAddress;
	}


	public void setVendorAddress (String vendorAddress) {
		this.vendorAddress = vendorAddress;
	}


	public String getLocationCode () {
		return locationCode;
	}


	public void setLocationCode (String locationCode) {
		this.locationCode = locationCode;
	}


	public float getBlendedRate () {
		return blendedRate;
	}

	public void setBlendedRate (float blendedRate) {
		this.blendedRate = blendedRate;
	}


	public Timestamp getAuditDate () {
		return auditDate;
	}

	public void setAuditDate (Timestamp auditDate) {
		this.auditDate = auditDate;
	}


	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.base.BaseVendorAuditTrans)) return false;
		else {
			com.jkt.rms.business.base.BaseVendorAuditTrans mObj = (com.jkt.rms.business.base.BaseVendorAuditTrans) obj;
			return (this.getId() == mObj.getId());
		}
	}


	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			return (int) this.getId();
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

}